$(document).ready(function(){
    var oTable = $('#tblRoom').dataTable({
        "bJQueryUI": true,
        "bProcessing": true,
        "iDisplayLength": 10,
        "sPaginationType": "full_numbers",
        "sAjaxSource": 'controller?Action=get_booked_rooms',
        "bAutoWidth": false,
        "aoColumns": [
        {
            "sTitle": "ID" ,
            "sClass": "center"
        },

        {
            "sTitle": "Name",
            "sClass": "center"
        },
        {
            "sTitle": "Number",
            "sClass": "center"
        },
        {
            "sTitle": "Location",
            "sClass": "center"
        },
        {
            "sTitle": "Checkin",
            "sClass": "center"
        },
        {
            "sTitle": "Checkout",
            "sClass": "center"
        },
        {
            "sTitle": "User",
            "sClass": "center"
        },
        {
            "sTitle": "Action",
            "sClass": "center",
            "fnRender": function(obj) {
                var sReturn = obj.aData[ obj.iDataColumn ];
                sForm=  "<form id='deleteBookedRoom' action='controller' name='controller' >"+
                "<input type='hidden' name='bookingID' value='"+sReturn+"' />"+
                "<input type='hidden' name='Action' value='delete_book_room' />" +
                "<input type='submit' name='Delete' value='Delete'/>"+
                "</form>";
                return sForm;
            }
        }
        ]
    });
});